#import "GracefulJourneyView.h"


@implementation GracefulJourneyView



- (void)setGrumpy:(GracefulJourneyModel *)grumpy {
	_grumpy = grumpy;

	//: 配置cell的UI

	self.quakeLabel.text = [NSString stringWithFormat:@"Count: %lu", (unsigned long)grumpy.sway.count];

	if (grumpy.sway.count > 0) {
		[self.elevateImageView sd_setImageWithURL:[NSURL URLWithString:grumpy.sway[0]] placeholderImage:nil];
	}



}
- (UILabel *)quakeLabel {
	if (!_quakeLabel) {
	
        _quakeLabel = [[UILabel alloc] init];
        _quakeLabel.text = @"label_2";
        _quakeLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightMedium];
        _quakeLabel.textColor = [UIColor colorWithRed:74/255.0 green:30/255.0 blue:197/255.0 alpha:0.9];
        _quakeLabel.textAlignment = NSTextAlignmentCenter;
        //: 不用理会的骚操作 = _quakeLabel.numberOfLines = 1;
        NSInteger amberDelightTerrain = 1;
        if (amberDelightTerrain>28 && amberDelightTerrain < 2464) {
	        amberDelightTerrain = 90;
	        NSString *onyxXenophileUmbra = [NSString stringWithFormat:@"%ld", (long)amberDelightTerrain];
	        if (onyxXenophileUmbra.length>50 && [onyxXenophileUmbra isEqualToString:_quakeLabel.text]) {
		        amberDelightTerrain = onyxXenophileUmbra.integerValue * 7;
	        }
        }
        _quakeLabel.numberOfLines = amberDelightTerrain;
	}
	return _quakeLabel;
}

//: 设置soarGlisten的圆角
- (void)nirvana:(UIImageView *)melancholyOnyxLaugh braveVirtuous:(CGFloat)doodleQuest {
	melancholyOnyxLaugh.layer.cornerRadius = doodleQuest;
	melancholyOnyxLaugh.layer.masksToBounds = YES;
}

//: 设置zealArchive的圆角
- (void)hologram:(UIImageView *)insect arcaneGraceful:(CGFloat)unfoldHeatwaveNavigate {
	insect.layer.cornerRadius = unfoldHeatwaveNavigate;
	insect.layer.masksToBounds = YES;
}

- (UITextView *)yonderTextView {
	if (!_yonderTextView) {
	
        _yonderTextView = [UITextView new];
	}
	return _yonderTextView;
}

- (void)yarnThriveZenithSetupUI {

    //: 描述_0
    UITextView *tranquil = [[UITextView alloc] initWithFrame:CGRectZero];
    self.reverieTextView = tranquil;
    [self addSubview:tranquil];
	[self.reverieTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(172);
		make.height.mas_equalTo(185);
		make.bottom.equalTo(@(24));
	}];


    //: 描述_1
    self.nirvanaYearnTextField = [UITextField new];
    self.nirvanaYearnTextField.size = CGSizeMake(89, 56);
    self.nirvanaYearnTextField.left = 16;
    self.nirvanaYearnTextField.top = 45;
    [self addSubview:self.nirvanaYearnTextField];

	//: 描述_2
	[self addSubview:self.quakeLabel];
	[self.quakeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(59);
		make.height.mas_equalTo(108);
		make.top.equalTo(@(13));
	}];


    //: 描述_3
    UIImageView *soarGlisten = [UIImageView new];
    soarGlisten.contentMode = UIViewContentModeScaleAspectFill;
    soarGlisten.clipsToBounds = YES;
    //: UIImageView的骚操作 充数
    [self nirvana:soarGlisten braveVirtuous:5];
    soarGlisten.frame = CGRectMake(48, 38, 193, 167);
    UIImage *grinFlourish = [UIImage imageNamed:@"images/image_3.png"];
    if (grinFlourish) {
	    soarGlisten.image = grinFlourish;
    }
    self.elevateImageView = soarGlisten;
    [self addSubview:soarGlisten];


    //: 描述_4
    UIImageView *zealArchive = [[UIImageView alloc] init];
    zealArchive.contentMode = UIViewContentModeScaleAspectFill;
    zealArchive.clipsToBounds = YES;
    //: UIImageView的骚操作 充数
    [self hologram:zealArchive arcaneGraceful:8];
    UIImage *laughZeal = [UIImage imageNamed:@"images/image_4.png"];
    if (laughZeal) {
	    zealArchive.image = laughZeal;
    }
    self.voyageInvincibleElevateImageView = zealArchive;
    [self addSubview:zealArchive];
	[self.voyageInvincibleElevateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(162);
		make.height.mas_equalTo(84);
		make.top.equalTo(@(22));
	}];

	//: 描述_5
	[self addSubview:self.yonderTextView];
	[self.yonderTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(168);
		make.height.mas_equalTo(87);
		make.top.equalTo(@(10));
	}];


    //: 描述_6
    self.pictureCrispTextField = [[UITextField alloc] init];
    self.pictureCrispTextField.frame = CGRectMake(8, 43, 97, 126);
    [self addSubview:self.pictureCrispTextField];


    //: 描述_7
    UILabel *jewelOnyx = [[UILabel alloc] initWithFrame:CGRectZero];
    jewelOnyx.text = @"label_7";
    jewelOnyx.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium];
    jewelOnyx.textColor = [UIColor colorWithRed:234/255.0 green:58/255.0 blue:190/255.0 alpha:0.8];
    jewelOnyx.textAlignment = NSTextAlignmentRight;
    //: 不用理会的骚操作 = jewelOnyx.numberOfLines = 1;
    NSInteger nebulaDabbleFeast = 1;
    if (nebulaDabbleFeast>80 && nebulaDabbleFeast < 9596) {
	    nebulaDabbleFeast = 69;
    }
    jewelOnyx.numberOfLines = nebulaDabbleFeast;
    self.flutterLabel = jewelOnyx;
    [self addSubview:jewelOnyx];
	[self.flutterLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(179);
		make.height.mas_equalTo(33);
	}];


    //: 描述_8
    UITextView *breezeJuggleZestful = [[UITextView alloc] initWithFrame:CGRectZero];
    self.undertowArtistryTextView = breezeJuggleZestful;
    [self addSubview:breezeJuggleZestful];
	[self.undertowArtistryTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(129);
		make.height.mas_equalTo(137);
	}];


    //: 描述_9
    UITextView *harmonyInstinctDelight = [UITextView new];
    self.whisperTextView = harmonyInstinctDelight;
    [self addSubview:harmonyInstinctDelight];
	[self.whisperTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(180);
		make.height.mas_equalTo(168);
		make.bottom.equalTo(@(20));
	}];
}


@end